//
//  WBStatusToolbar.swift
//  DXWeibo
//
//  Created by dx on 2017/1/15.
//  Copyright © 2017年 dx. All rights reserved.
//

import UIKit

/// ** 一个xib不一定对应一个独立的视图
class WBStatusToolbar: UIView {
    
    var viewModel: WBStatusViewModel? {
        
        didSet{
            
            /// 视图模型 - 把要计算的业务逻辑全部抽取出去，视图上不再需要考虑计算，只需要拿出属性直接设置
            
            retweetedButton.setTitle(viewModel?.retweetedStr, for: .normal)
            commentButton.setTitle(viewModel?.commentStr, for: .normal)
            likeButton.setTitle(viewModel?.likeStr, for: .normal)
        }
    }
    
    /// 转发
    @IBOutlet weak var retweetedButton: UIButton!
    /// 评论
    @IBOutlet weak var commentButton: UIButton!
    /// 赞
    @IBOutlet weak var likeButton: UIButton!

}
